﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Diagram.aspx.cs" Inherits="HK_Diagram" Title="Untitled Page" %>
<%@ Register Src="~/UserControl/HotelDiagram.ascx" TagName="HotelDiagram" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">
<uc:HotelDiagram ID="uxDiagrams" runat="server"  SelectionMode="ContextMenu" HideRoomStatus="true"  />

    <gr:HotelContextMenu ID="uxRoomContextMenu" runat="server" OnClientItemClicking="doMenuClicking"
        OnItemClick="DoContextMenuClick" XMLKey="RoomAction_ManageRoom">
    </gr:HotelContextMenu>
    <gr:HotelContextMenu ID="uxFloorContextMenu" runat="server" XMLKey="FloorContextMenu">
    </gr:HotelContextMenu>
    
    <gr:Button runat="server" ID="uxReload" style=" display:none;" OnClick="uxReload_Click" />
    <gr:GuruCodeBlock ID="GuruCodeBlock1" runat="server">
        <script type="text/javascript">
            function doMenuClicking(sender, args) {               
                var menuItemValue = args.get_item().get_value();
                switch(menuItemValue){                
                    case "ViewRoomInfor":
                        args.set_cancel(true);  
                        sender.hide();
                        OpenPopupModal(1, '<%=ResolveUrl("~/")%>HK/RoomInfoModal.aspx?' + sender.secParams);  
                        break;
                }
                return false;
            }
            function getContextMenu(roomStatus) {
                var contextMenuID = "<%=uxRoomContextMenu.ClientID %>";              
                return $find(contextMenuID);
            }
            function getFloorContextMenu(){
                var contextMenuID = "<%=uxFloorContextMenu.ClientID %>";              
                return $find(contextMenuID);
            }
            function ReloadPage(){
                document.getElementById("<%=uxReload.ClientID%>").click();
            }
        </script>
    </gr:GuruCodeBlock>
</asp:Content>

